<?php
class App_Admin_Form_PluginEdit extends Main_Form
{
	/**
     * @var array
     */
    protected $_decoratorsForm  = array(
        'PrepareElements',
        array('ViewScript', array('viewScript' => '_form/plugin-edit.phtml')),
    );
	
	/**
	 * @return void
	 */
	public function init()
	{
		parent::init();
		
		$this->setMethod('post');
		$this->setDecorators($this->_decoratorsForm);
		
		$this->addElement('text', 'name', array(
			'label'	=> 'Имя',
			'required' => true,
			'order'	=> 10,
		));
		
		$this->addElement('text', 'title', array(
			'label'	=> 'Название',
			'required' => true,
			'order'	=> 20,
		));
		
		$this->addElement('textarea', 'description', array(
			'label'	=> 'Описание',
			'required' => true,
			'rows' => 2,
            'cols' => 40,
			'maxlength' => 1000,
			'order'	=> 30,
		));
		
		$this->addElement('checkbox', 'f_active', array(
			'label'	=> 'Статус',
			'order'	=> 35,
		));
		
		$this->addElement('submit', 'addButton', array(
			'label' => 'Сохранить',
			'order'	=> 40,
		));
	}

}